<template>
  <div style="background-color:white">
    <div style="">
      <Row class="title-top">
        <Col span="4" style="text-align: left;width:22%">城市低保救助申请登记</Col>
      </Row>
    </div>
    <div style="height:30px;">
      <Steps :current="1" size="small">
        <div @click="nextStep('0')" class="step-item">
          <Step title="家庭信息" content=""></Step>
        </div>
        <div @click="nextStep('1')" class="step-item">
          <Step title="家庭成员" content=""></Step>
        </div>
        <div @click="nextStep('2')" class="step-item">
          <Step title="基础收入" content=""></Step>
        </div>
        <div @click="nextStep('3')" class="step-item">
          <Step title="基础支出" content=""></Step>
        </div>
        <div @click="nextStep('4')" class="step-item">
          <Step title="赡抚扶养" content=""></Step>
        </div>
        <div @click="nextStep('5')" class="step-item">
          <Step title="基础财产" content=""></Step>
        </div>
        <div @click="nextStep('6')" class="step-item">
          <Step title="财产房产" content=""></Step>
        </div>
        <div @click="nextStep('7')" class="step-item">
          <Step title="工作单位" content=""></Step>
        </div>
        <div @click="nextStep('8')" class="step-item">
          <Step title="教育情况" content=""></Step>
        </div>
        <div @click="nextStep('9')" class="step-item">
          <Step title="家庭附件" content=""></Step>
        </div>
        <div @click="nextStep('10')" class="step-item">
          <Step title="提交信息" content=""></Step>
        </div>
      </Steps>
    </div>
    <div class="content">
      <div class="navi-title">
        家庭成员信息
      </div>
      <div style="height:30px;margin-top:3px" ref="paramData" :rules="ruleValidate">
        <Button type="info" class="step-item" style="margin-left:5px" size="small" @click="entry()" icon="md-add" v-if="order_state != '1' && order_state != '2' && order_state != '3'">保障人员录入</Button>
        <Button type="info" class="step-item" style="margin-left:5px" size="small" @click="entryNot()" icon="md-add" v-if="order_state != '1' && order_state != '2' && order_state != '3'">非保障人员录入</Button>
        <div v-if="order_state != '1' && order_state != '2' && order_state != '3'"><span style="margin-left:5px;padding-top: 2px;height: 30px;color: red;">*请先完善申请人本人的个人信息</span></div>
        <Modal v-model="modal" title="保障人员信息" width="1100" cancel-text="关闭"
          style="position:relative;">
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">姓名:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0003" placeholder=""></Input>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">与申请人关系:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0517">
                <Option :value="obj.key" v-for="obj in data2.FamilyRelationshipDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">证件类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0002">
                <Option :value="obj.key" v-for="obj in data2.CertificateTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">证件号码:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0001" placeholder=""></Input>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">国籍:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0006">
                <Option :value="obj.key" v-for="obj in data2.NationalityDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">户籍类别:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0013">
                <Option :value="obj.key" v-for="obj in data2.RegisterTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">民族:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0007">
                <Option :value="obj.key" v-for="obj in data2.nationDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">文化程度:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0008">
                <Option :value="obj.key" v-for="obj in data2.EducationDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">政治面貌:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0012">
                <Option :value="obj.key" v-for="obj in data2.PoliticalOutlookDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">婚姻状况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0010">
                <Option :value="obj.key" v-for="obj in data2.MaritalStatusDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">特定救助对象类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0547" clearable>
                <Option :value="obj.key" v-for="obj in data2.SpecificReliefDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">学业状况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0539">
                <Option :value="obj.key" v-for="obj in data2.EducationStatusDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">就业状况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0540">
                <Option :value="obj.key" v-for="obj in data2.WorkStatusDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">职业:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0011" clearable>
                <Option :value="obj.key" v-for="obj in data2.OccupationTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">健康状况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0009">
                <Option :value="obj.key" v-for="obj in data2.HealthDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">劳动能力丧失情况:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0502">
                <Option :value="obj.key" v-for="obj in data2.WorkAbilityDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">残疾类别:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0504" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '40'" clearable>
                <Option :value="obj.key" v-for="obj in data2.DisabilityTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">残疾等级:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0505" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '40'" clearable>
                <Option :value="obj.key" v-for="obj in data2.DisabilityClassDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">残疾等级评定时间:</Col>
            <Col span="4">
              <DatePicker type="date" v-model="paramData.azcp0506" style="width: 178px" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '40'"></DatePicker>
            </Col>
            <Col span="4" style="text-align: center" class="">是否伤残:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0507">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">伤残等级:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0508" :disabled="paramData.azcp0507 == '0'" clearable>
                <Option :value="obj.key" v-for="obj in data2.InvalidismClassDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">生活自理能力:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0513">
                <Option :value="obj.key" v-for="obj in data2.SelfcareAbilityDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">护理类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0546" :disabled="paramData.azcp0009 != '40'" clearable>
                <Option :value="obj.key" v-for="obj in data2.NurseTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">伤残等级评定时间:</Col>
            <Col span="4">
              <DatePicker type="date" v-model="paramData.azcp0509" style="width: 178px" :disabled="paramData.azcp0507 == '0'"></DatePicker>
            </Col>
            <Col span="4" style="text-align: center" class="">重病患病时间:</Col>
            <Col span="4">
              <DatePicker type="date" v-model="paramData.azcp0522" style="width: 178px" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '60'"></DatePicker >
            </Col>
            <Col span="4" style="text-align: center" class="">重病病种:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0524" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '60'" clearable>
                <Option :value="obj.key" v-for="obj in data2.SicknessTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">重病名称:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0525" placeholder="" :disabled="paramData.azcp0009 == '10' || paramData.azcp0009 == '20' || paramData.azcp0009 == '30' || paramData.azcp0009 == '60'"></Input>
            </Col>
            <Col span="4" style="text-align: center" class="">优抚对象类别:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0520" clearable>
                <Option :value="obj.key" v-for="obj in data2.SpecialCareDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否军休干部:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0018">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">是否收养对象:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0023">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否流浪乞讨救助人员:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0024">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否福利院入住对象:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0025">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">是否复原退伍军人:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0027">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">现居住地开始居住时间:</Col>
            <Col span="4">
              <DatePicker v-model="paramData.azcp0501" type="date" style="width: 178px"></DatePicker>
              <!-- <DatePicker v-model="paramData.azcp0501" format="yyyy年MM月dd日" type="date" style="width: 178px"></DatePicker> -->
            </Col>
            <Col span="4" style="text-align: center" class="red-name">是否三无人员:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0512">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">联系电话:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0514" placeholder=""></Input>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">养老保险参保类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0526">
                <Option :value="obj.key" v-for="obj in data2.PensionTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">是否参加医疗保险:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0527" @on-change="change(paramData.azcp0527)">
                <Option :value="obj.key" v-for="obj in data2.InsuranceOrNotDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">医疗保险参保类型:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0528" :disabled="paramData.azcp0527 == '0' || paramData.azcp0527 == '2'">
                <Option :value="obj.key" v-for="obj in data2.InsuredTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">是否参加失业保险:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0531">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">社保编号或新农合编号:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0529" placeholder=""></Input>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">社保卡号或新农合卡号:</Col>
            <Col span="4">
              <Input v-model="paramData.azcp0530" placeholder=""></Input>
            </Col>
            <Col span="4" style="text-align: center" class="">所属资源枯竭关破企业名称:</Col>
            <Col span="4">
             <Select v-model="paramData.azcp0541">
                <Option :value="obj.key" v-for="obj in data2.BrokenEnterpriseDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="">是否纳入扶贫建档立卡对象:</Col>
            <Col span="4">
              <Select v-model="paramData.azcp0545">
                <Option :value="obj.key" v-for="obj in data2.YesOrNoDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="" style="height:250px;line-height:250px">
            <Col span="3" style="text-align: center" class="">
              <Col span="24" style="text-align: center" class="">身份证信息上传:</Col>
            </Col>
            <Col span="21" style="text-align: center" class="">
              <Col span="8" style="text-align: center" class="">
                <div class="imgBackColor">
                  <img :src="nophoto" alt="..." class="head-img1">
                </div>
              </Col>
              <Col span="4" style="text-align: center" class="">
                <div class="positiveTDiv" @click="uploadPositiveImg('Positive')">
                  正面上传
                </div>
                <div class="positiveBDiv">
                  <span>正面拍摄</span>
                </div>
              </Col>
              <Col span="8" style="text-align: center" class="">
                <div class="imgBackColor">
                  <img :src="nophoto1" alt="..." class="head-img1">
                </div>
              </Col>
              <Col span="4" style="text-align: center" class="">
                <div class="positiveTDiv" @click="uploadPositiveImg('Back')">
                  反面上传
                </div>
                <div class="positiveBDiv">
                  <span>反面拍摄</span>
                </div>
              </Col>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">备注说明:</Col>
            <Col span="20">
              <Input v-model="paramData.azcp0543" placeholder=""></Input>
            </Col>
          </Row>
          <img :src="nophoto2" alt="..." style="height: 160px; width:120px;position:absolute;right:20%;top:7%;">
          <div slot="footer">
            <Button type="text" size="large" @click="modal = false">取消</Button>
            <Button type="success" size="large" :disabled="order_state == '1' || order_state == '2' || order_state == '3'" @click="ok111(paramData)">信息核验</Button>
            <Button type="primary" size="large" :disabled="order_state == '1' || order_state == '2' || order_state == '3' || submitFlag == false" @click="submit(paramData)">确定</Button>
          </div>
        </Modal>
        <Modal v-model="modalNot" title="非保障人员信息" width="1100" cancel-text="关闭"
          style="position:relative;">
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">姓名:</Col>
            <Col span="4">
              <Input v-model="paramData1.azcp0003" placeholder=""></Input>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">与申请人关系:</Col>
            <Col span="4">
              <Select v-model="paramData1.azcp0517">
                <Option :value="obj.key" v-for="obj in data2.FamilyRelationshipDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">证件类型:</Col>
            <Col span="4">
              <Select v-model="paramData1.azcp0002">
                <Option :value="obj.key" v-for="obj in data2.CertificateTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">证件号码:</Col>
            <Col span="4">
              <Input v-model="paramData1.azcp0001" placeholder=""></Input>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">户籍类别:</Col>
            <Col span="4">
              <Select v-model="paramData1.azcp0013">
                <Option :value="obj.key" v-for="obj in data2.RegisterTypeDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">民族:</Col>
            <Col span="4">
              <Select v-model="paramData1.azcp0007">
                <Option :value="obj.key" v-for="obj in data2.nationDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">文化程度:</Col>
            <Col span="4">
              <Select v-model="paramData1.azcp0008">
                <Option :value="obj.key" v-for="obj in data2.EducationDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">健康状况:</Col>
            <Col span="4">
              <Select v-model="paramData1.azcp0009">
                <Option :value="obj.key" v-for="obj in data2.HealthDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="red-name">婚姻状况:</Col>
            <Col span="4">
              <Select v-model="paramData1.azcp0010">
                <Option :value="obj.key" v-for="obj in data2.MaritalStatusDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
            <Col span="4" style="text-align: center" class="red-name">劳动能力丧失情况:</Col>
            <Col span="4">
              <Select v-model="paramData1.azcp0502">
                <Option :value="obj.key" v-for="obj in data2.WorkAbilityDict" v-bind:key="obj.key">{{obj.value}}</Option>
              </Select>
            </Col>
          </Row>
          <Row class="" style="height:250px;line-height:250px">
            <Col span="3" style="text-align: center" class="">
              <Col span="24" style="text-align: center" class="">身份证信息上传:</Col>
            </Col>
            <Col span="21" style="text-align: center" class="">
              <Col span="8" style="text-align: center" class="">
                <div class="imgBackColor">
                  <img :src="nophoto" alt="..." class="head-img1">
                </div>
              </Col>
              <Col span="4" style="text-align: center" class="">
                <div class="positiveTDiv" @click="uploadPositiveImg('Positive')">
                  正面上传
                </div>
                <div class="positiveBDiv">
                  <span>正面拍摄</span>
                </div>
              </Col>
              <Col span="8" style="text-align: center" class="">
                <div class="imgBackColor">
                  <img :src="nophoto1" alt="..." class="head-img1">
                </div>
              </Col>
              <Col span="4" style="text-align: center" class="">
                <div class="positiveTDiv" @click="uploadPositiveImg('Back')">
                  反面上传
                </div>
                <div class="positiveBDiv">
                  <span>反面拍摄</span>
                </div>
              </Col>
            </Col>
          </Row>
          <Row class="item1">
            <Col span="4" style="text-align: center" class="">备注说明:</Col>
            <Col span="20">
              <Input v-model="paramData.azcp0543" placeholder=""></Input>
            </Col>
          </Row>
          <img :src="nophoto3" alt="..." style="height: 160px; width:120px;position:absolute;right:20%;top:7%;">
          <div slot="footer">
            <Button type="text" size="large" @click="modalNot = false">取消</Button>
            <Button type="primary" size="large" :disabled="order_state == '1' || order_state == '2' || order_state == '3'" @click="okNot(paramData1)">确定</Button>
          </div>
        </Modal>
        <Modal v-model="up_pic_mol" title="图片上传" @on-ok="changeToView" :closable="false">
          <Upload multiple action="http://120.27.63.37:38081/api/ac/file/fileCommonService/upLoadFiles" :before-upload="beforeUpload">
            <Button icon="ios-cloud-upload-outline">上传图片</Button>
            <span style="margin-left: 250px">建议上传小于8M的图片</span>
          </Upload>
          <img :src="temp_photo" style="width: 100%"/>
        </Modal>
        <!-- 图片查看模态框 -->
        <Modal v-model="picPreviewMol.preShow" :closable="false" :styles="{top: '20px'}" width="532">
          <Carousel v-model="picPreviewMol.picIndex" style="width:500px" dots="outside" trigger="hover">
            <CarouselItem class="centerimg" v-for="(imginfo, index) in picPreviewMol.pic_urls" :key="index">
              <img :src="imginfo" class="pre_img_style" />
            </CarouselItem>
          </Carousel>
          <div slot="footer" style="text-align: center">
            <!-- <Button type="info" @click="originalGraph">查看原图</Button>
            <Button type="error" v-if="formItem.operation" @click="deletePic">删除当前照片</Button> -->
            <Button @click="picPreviewMol.preShow=false">关闭</Button>
          </div>
        </Modal>
      </div>
      <div>
        <Table :columns="columns1" :data="data3">
          <template slot-scope="{ row, index, column }" slot="action">
              <Button type="info" size="small"  @click="edit(index)" style="margin-right:5px">编辑</Button>
              <Button type="error" size="small" :disabled="order_state == '1' || order_state == '2' || order_state == '3'"  @click="deletePeople(index)" v-if="index !== 0">删除</Button>
          </template>
        </Table>
        <div style="margin: 10px;overflow: hidden">
          <div style="float: right;">
              <Page :total="data3.length" :current="1" @on-change="changePage"></Page>
          </div>
        </div>
      </div>
    </div>
    <div style="height:40px;line-height:40px;float:left;margin-top:10px;margin-left:40%">
      <Button type="info" :disabled="order_state == '1' || order_state == '2' || order_state == '3'" @click="next()" style="margin-right:5px">下一步></Button>
      <Button type="info" @click="nextPage()" v-if="order_state == '1' || order_state == '2' || order_state == '3'">下一页></Button>
    </div>
  </div>
</template>
<script>
import { getCityDBAppraising } from '@/api/subsistenceAlowances'
import { date2str, iteminf, updateOrder, getUuid, createDisabilityApi } from '@/api/eventlist'
import nophoto from '@/assets/images/nophoto.jpeg'
import nophoto1 from '@/assets/images/nophoto1.jpeg'
import nophoto2 from '@/assets/images/nophoto2.jpeg'
import nophoto3 from '@/assets/images/nophoto3.jpeg'
import { getSign, createUpLoadFiles } from '@/api/common'
import * as imageConversion from 'image-conversion'
import './index.less'
export default {
  name: 'db_subsistenceapplication1',
  data () {
    return {
      submitParam: {}, // 订单入参
      submitFlag: false, // 控制确定按钮是否可以进行操作
      currentDate: '', // 当前年月日
      next_params: {},
      itemid: this.$route.params.itemid || '',
      family_url: '',
      info_url: '',
      add_url: '',
      update_url: '',
      delete_url: '',
      see: this.$route.params.see || false,
      code: this.$route.params.code,
      url: 'dbsq/addPersonInfo',
      str: this.$route.params.serialNumber,
      idcardNumber: this.$route.params.idcardNumber,
      cardno: this.$route.params.cardno,
      ss11001Id: this.$route.params.ss11001Id,
      ss11002Id: this.$route.params.ss11002Id,
      ss17001Id: this.$route.params.ss17001Id || '',
      ss17002Id: this.$route.params.ss17002Id || '',
      errorTitle: '保存错误',
      columns1: [
        {
          title: '姓名',
          key: 'azcp0003',
          align: 'center',
          width: '90px'
        },
        {
          title: '与申请人关系',
          key: 'azcp0517',
          align: 'center',
          width: '120px'
        },
        {
          title: '性别',
          key: 'azcp0004',
          align: 'center',
          width: '70px'
        },
        {
          title: '证件类型',
          key: 'card_type',
          align: 'center'
        },
        {
          title: '证件号码',
          key: 'azcp0001',
          align: 'center'
        },
        {
          title: '民族',
          key: 'azcp0007',
          align: 'center',
          width: '70px'
        },
        {
          title: '健康状况',
          key: 'azcp0009',
          align: 'center'
        },
        {
          title: '劳动能力丧失情况',
          key: 'azcp0502',
          align: 'center',
          width: '140px'
        },
        {
          title: '操作',
          slot: 'action',
          align: 'center'
        }
      ],
      temp: {
        hjcity: '',
        hjarea: ''
      },
      paramData: {
        type: 'guarantee', // 保障人员类型
        ss11002Id: '',
        azcp0507: '',
        azcp0505: '',
        azcp0504: '',
        azcp0502: '',
        azcp0543: '',
        azcp0027: '',
        azcp0024: '',
        azcp0541: '',
        azcp0025: '',
        azcp0547: '',
        azcp0545: '',
        azcp0023: '',
        azcp0540: '',
        azcp0539: '',
        azcp0013: '',
        azcp0530: '',
        azcp0531: '',
        azcp0018: '',
        azcp0011: '',
        azcp0012: '',
        azcp0010: '',
        azcp0529: '',
        azcp0527: '0',
        azcp0002: '',
        azcp0003: '',
        azcp0520: '',
        azcp0008: '',
        azcp0525: '',
        azcp0009: '',
        azcp0526: '',
        azcp0006: '',
        azcp0007: '',
        azcp0524: '',
        azcp0001: '',
        azcp0517: '',
        azcp0514: '',
        azcp0512: '',
        azcp0513: '',
        azcp0020: '',
        azcp0510: '',
        azcp0518: '',
        azcp0519url: '',
        azcp0519: '',
        azcp0523: '',
        azcp0508: ''
      },
      paramData1: {
        type: 'nonSecurity', // 非保障
        ss11012Id: '',
        azcp0001: '',
        azcp0002: '',
        azcp0003: '',
        azcp0517: '',
        azcp0519: '',
        azcp0013: '',
        azcp0007: '',
        azcp0008: '',
        azcp0010: '',
        azcp0009: '',
        azcp0502: '',
        azcp0543: '',
        azcp0551: '',
        azcp0552: ''
      },
      ruleValidate: {
        azcp0003: [
          { required: true, message: 'The name cannot be empty', trigger: 'blur' }
        ]
      },
      data1: [],
      data2: [],
      data3: [],
      formitem1: {
        input: '',
        input1: '',
        input2: '',
        input3: '',
        input4: '',
        select: '',
        radio: 'male',
        checkbox: [],
        switch: true,
        date: '',
        time: '',
        slider: [20, 50],
        textarea: ''
      },
      formLeft: {
        input1: ''
      },
      modal: false,
      modalNot: false,
      nophoto,
      nophoto1,
      nophoto2,
      nophoto3,
      order_state: this.$route.params.order_state,
      personList: [],
      personList1: [],
      id: '',
      form_params: {
        ss11001Data: {},
        ss11002Data: [],
        ss11003Data: [],
        ss11004Data: [],
        ss11005Data: [],
        ss11006Data: [],
        ss11007Data: [],
        ss11008Data: [],
        ss11009Data: [],
        ss11010Data: [],
        ss11012Data: [],
        ss12001Data: {}
      },
      // 图片要件预览临时变量
      temp_photo: '',
      // 图片要件预览弹出框控制器
      picPreviewMol: {
        preShow: false,
        pic_urls: [],
        picIndex: 0
      },
      upPicData: {},
      up_pic_mol: false,
      imgType: '',
      totalNumber: '', // 家庭成员长度
      personType: '', // 保障人员或非保障人员
      hjobj: {}, // 保障人员户籍情况json
      cjobj: {}, // 保障人员残疾情况json
      hyobj: {} // 保障人员婚姻情况json
    }
  },
  methods: {
    formatDisLevelPerson (val) {
      return val === '01' ? '一级' : val === '02' ? '二级' : val === '03' ? '三级' : val === '04' ? '四级' : ''
    },
    formatDisTypePerson (val) {
      return val === '61' ? '视力残疾' : val === '62' ? '听力残疾' : val === '63' ? '言语残疾' : val === '64' ? '肢体残疾' : val === '65' ? '智力残疾' : val === '66' ? '精神残疾' : val === '67' ? '多重残疾' : val === '69' ? '其他残疾' : ''
    },
    change (val) {
      if (val === '0') {
        this.paramData.azcp0528 = ''
      }
    },
    changeToView () {
      if (this.imgType === 'Positive') {
        this.nophoto = this.temp_photo
      } else if (this.imgType === 'Back') {
        this.nophoto1 = this.temp_photo
      }
    },
    uploadPositiveImg (type) { // 正面上传
      this.temp_photo = ''
      this.imgType = type
      this.up_pic_mol = true
      if (type === 'Positive') {
        this.upPicData.fileName = '身份证正面' + this.datetime2str(new Date()) + '.png'
      } else if (type === 'Back') {
        this.upPicData.fileName = '身份证背面' + this.datetime2str(new Date()) + '.png'
      }
      this.upPicData.filePath = 'itemorder/' + '/' + this.$route.params.code
    },
    // 把图片文件作为参数传递到方法中进行压缩
    beforeAvatarUpload (file) {
      const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'
      if (!isJpgOrPng) {
        this.$Notice.error({ title: '上传失败', desc: '上传头像图片只能是 JPG 或 PNG 格式!' })
        return false
      }
      return new Promise(() => {
        imageConversion.compressAccurately(file, 200).then(res => {
          let that = this
          const reader = new FileReader()
          reader.readAsDataURL(new File([res], '', { type: res.type, lastModified: Date.now() }))
          reader.onload = () => {
            let index = reader.result.indexOf('base64,') + 7
            that.upPicData.file = reader.result.substring(index)
            that.upPic(that.upPicData)
          }
        })
      })
    },
    // 上传图片前转base64
    beforeUpload (file) {
      this.upPicData.fileName = this.upPicData.fileName + '.' + file.type.substring(6)
      if (file.size / 1024 / 1024 > 1) { // 超过1M 压缩 图片为200K
        return this.beforeAvatarUpload(file)
      }
      let that = this
      const reader = new FileReader()
      reader.readAsDataURL(file)
      reader.onload = () => {
        let index = reader.result.indexOf('base64,') + 7
        that.upPicData.file = reader.result.substring(index)
        // if (this.personType === 'guarantee') {
        //   if (this.imgType === 'Positive') {
        //     that.paramData.azcp0551 = reader.result.substring(index)
        //   } else if (this.imgType === 'Back') {
        //     that.paramData.azcp0552 = reader.result.substring(index)
        //   }
        // } else if (this.personType === 'nonSecurity') {
        //   if (this.imgType === 'Positive') {
        //     that.paramData1.azcp0551 = reader.result.substring(index)
        //   } else if (this.imgType === 'Back') {
        //     that.paramData1.azcp0552 = reader.result.substring(index)
        //   }
        // }
        that.upPic(that.upPicData)
      }
      return false
    },
    // 上传图片
    upPic (obj) {
      var time = new Date().getTime()
      this.timeStep = time.toString()
      let param = {
        filePath: obj.filePath,
        fileName: obj.fileName,
        timestamp: this.timeStep
      }
      if (param.fileName.length > 20) {
        param.fileName = param.fileName.substring(0, 20) + '.png'
      }
      getSign(param).then(res => {
        if (res.data.errcode === 0) {
          createUpLoadFiles(res.data.data.docking_url, { sign: res.data.data.sign, timestamp: this.timeStep, filePath: param.filePath, fileName: param.fileName, file: obj.file }).then(res => {
            if (res.data.errcode === 0) {
              let imgurl = res.data.data
              if (this.personType === 'guarantee') {
                if (this.imgType === 'Positive') {
                  this.paramData.azcp0551url = imgurl
                } else if (this.imgType === 'Back') {
                  this.paramData.azcp0552url = imgurl
                }
              } else if (this.personType === 'nonSecurity') {
                if (this.imgType === 'Positive') {
                  this.paramData1.azcp0551url = imgurl
                } else if (this.imgType === 'Back') {
                  this.paramData1.azcp0552url = imgurl
                }
              }
              // let list = this.documentlist[this.formItem.paramIndex]
              // if (list.img_urls) {
              //   list.img_urls.push(imgurl)
              // } else {
              //   list.img_urls = [imgurl]
              // }
              this.temp_photo = imgurl
              // console.log(this.formItem.operation)
            } else {
              this.$Notice.error({ title: '上传失败', desc: res.data.data.msg })
            }
          })
        } else {
          this.$Notice.error({ title: '上传失败', desc: res.data.data.msg })
        }
      })
    },
    nextStep (step) {
      if (step === '0') {
        this.$router.push({
          name: 'db_subsistenceapplication',
          params: this.next_params
        })
      } else if (step === '2') {
        this.$router.push({
          name: 'db_subsistenceapplication2',
          params: this.next_params
        })
      } else if (step === '3') {
        this.$router.push({
          name: 'db_expenditurelist',
          params: this.next_params
        })
      } else if (step === '4') {
        this.$router.push({
          name: 'db_supportlist',
          params: this.next_params
        })
      } else if (step === '5') {
        this.$router.push({
          name: 'db_basicproperty',
          params: this.next_params
        })
      } else if (step === '6') {
        this.$router.push({
          name: 'db_houseproperty',
          params: this.next_params
        })
      } else if (step === '7') {
        this.$router.push({
          name: 'db_workunit',
          params: this.next_params
        })
      } else if (step === '8') {
        this.$router.push({
          name: 'db_educationinfo',
          params: this.next_params
        })
      } else if (step === '9') {
        this.$router.push({
          name: 'db_nearfamily',
          params: this.next_params
        })
      }
    },
    nextPage () {
      this.$router.push({
        name: 'db_subsistenceapplication2',
        params: this.next_params
      })
    },
    getInfo (relation, card_type, register_type, nation, health, work, index) { // 个人信息
      console.log(relation, card_type, register_type, nation, health, work, '证件类型，户籍类别，民族，健康状况，劳动能力')
      var param = {
        'idcardNumber': this.idcardNumber,
        'dictsCode': 'ss11002',
        'serialNumber': this.str
      }
      getCityDBAppraising(param).then(res => {
        this.data2 = res.data.data.data
        for (var r in this.data2.FamilyRelationshipDict) {
          if (this.data2.FamilyRelationshipDict[r].key === relation) {
            this.data3[index].azcp0517 = JSON.parse(JSON.stringify(this.data2.FamilyRelationshipDict[r].value))
          }
        }
        for (var i in this.data2.CertificateTypeDict) {
          if (this.data2.CertificateTypeDict[i].key === card_type) {
            this.data3[index].card_type = JSON.parse(JSON.stringify(this.data2.CertificateTypeDict[i].value))
          }
        }
        for (var j in this.data2.RegisterTypeDict) {
          if (this.data2.RegisterTypeDict[j].key === register_type) {
            this.data3[index].azcp0013 = this.data2.RegisterTypeDict[j].value
          }
        }
        for (var k in this.data2.nationDict) {
          if (this.data2.nationDict[k].key === nation) {
            this.data3[index].azcp0007 = this.data2.nationDict[k].value
          }
        }
        for (var p in this.data2.HealthDict) {
          if (this.data2.HealthDict[p].key === health) {
            this.data3[index].azcp0009 = this.data2.HealthDict[p].value
          }
        }
        for (var q in this.data2.WorkAbilityDict) {
          if (this.data2.WorkAbilityDict[q].key === work) {
            this.data3[index].azcp0502 = this.data2.WorkAbilityDict[q].value
          }
        }
      })
    },
    ok111 (item1) { // 保障人口保存
      this.form_params.ss11002Data = []
      this.paramData.azcp0522 = date2str(this.paramData.azcp0522)
      this.paramData.azcp0501 = date2str(this.paramData.azcp0501)
      this.paramData.azcp0506 = date2str(this.paramData.azcp0506)
      this.paramData.azcp0509 = date2str(this.paramData.azcp0509)
      // delete this.paramData.azcp0519
      this.submitParam = {}
      if (this.paramData.azcp0003 === '' || this.paramData.azcp0003 === undefined) {
        const content = '<p>请输入姓名</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0517 === '' || this.paramData.azcp0517 === undefined) {
        const content = '<p>请选择与申请人关系</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0002 === '' || this.paramData.azcp0002 === undefined) {
        const content = '<p>请选择证件类型</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0001 === '' || this.paramData.azcp0001 === undefined) {
        const content = '<p>请填写证件号码</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0013 === '' || this.paramData.azcp0013 === undefined) {
        const content = '<p>请选择户籍类别</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0007 === '' || this.paramData.azcp0007 === undefined) {
        const content = '<p>请选择民族</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0010 === '' || this.paramData.azcp0010 === undefined) {
        const content = '<p>请选择婚姻状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0540 === '' || this.paramData.azcp0540 === undefined) {
        const content = '<p>请选择就业状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0009 === '' || this.paramData.azcp0009 === undefined) {
        const content = '<p>请选择健康状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0527 === '' || this.paramData.azcp0527 === undefined) {
        const content = '<p>请选择是否参加医疗保险</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0009 === '60') { // 残疾
        if (this.paramData.azcp0504 === '' || this.paramData.azcp0504 === undefined) {
          const content = '<p>请选择残疾类别</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
          return
        }
        if (this.paramData.azcp0505 === '' || this.paramData.azcp0505 === undefined) {
          const content = '<p>请选择残疾等级</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
          return
        }
      }
      if (this.paramData.azcp0009 === '40') { // 重病
        if (this.paramData.azcp0524 === '' || this.paramData.azcp0524 === undefined) {
          const content = '<p>请选择重病病种</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
          return
        }
        // if (this.paramData.azcp0525 === '' || this.paramData.azcp0525 === undefined) {
        //   const content = '<p>请选择重病名称</p>'
        //   this.$Modal.error({
        //     title: this.errorTitle,
        //     content: content
        //   })
        //   return
        // }
      }
      if (this.paramData.azcp0507 === '1') { // 是否伤残
        if (this.paramData.azcp0508 === '' || this.paramData.azcp0508 === undefined) {
          const content = '<p>请选择伤残等级</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
          return
        }
      }
      if (this.paramData.azcp0507 === '0') { // 非伤残
        this.paramData.azcp0508 = ''
      }
      if (this.paramData.azcp0527 === '1') { // 是否参加医疗保险
        if (this.paramData.azcp0528 === '' || this.paramData.azcp0528 === undefined) {
          const content = '<p>请选择医疗保险类型</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
          return
        }
      }
      if (this.paramData.azcp0502 === '' || this.paramData.azcp0502 === undefined) {
        const content = '<p>请选择劳动能力丧失情况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0513 === '' || this.paramData.azcp0513 === undefined) {
        const content = '<p>请选择生活自理能力</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0526 === '' || this.paramData.azcp0526 === undefined) {
        const content = '<p>请选择养老保险参保类型</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0531 === '' || this.paramData.azcp0531 === undefined) {
        const content = '<p>请选择是否参加失业保险</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0512 === '' || this.paramData.azcp0512 === undefined) {
        const content = '<p>请选择是否三无人员</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0551url === '' || this.paramData.azcp0551url === undefined) {
        const content = '<p>请上传身份证正面照片</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData.azcp0552url === '' || this.paramData.azcp0552url === undefined) {
        const content = '<p>请上传身份证反面照片</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      var HJparam = {
        method: 'getPersonnelInfo',
        disabled_data: {
          'item_id': '11210101000000MZJD5212000330000',
          'cardno': this.paramData.azcp0001,
          'name': this.paramData.azcp0003
        },
        accountid: 'qstb'
      }
      var CJparam = {
        method: 'getDisabilityCheckInfo',
        disabled_data: {
          'item_id': '11210101000000MZJD5212000330000',
          'cardno': this.paramData.azcp0001,
          'name': this.paramData.azcp0003
        },
        accountid: 'qstb'
      }
      if (this.id !== '') { // 编辑
        // this.personList[this.id] = this.paramData
        var personData = this.paramData
        this.data3 = JSON.parse(JSON.stringify(this.personList))
        var disLevel = this.formatDisLevelPerson(personData.azcp0505)
        var disType = this.formatDisTypePerson(personData.azcp0504)
        createDisabilityApi(CJparam).then(ret => {
          if (ret.data.errcode === 0) {
            createDisabilityApi(HJparam).then(res => {
              if (res.data.errcode === 0) {
                console.log('调用对接接口')
                let dismsg = {
                  'ssdt0001': '',
                  'ssdt0002': '',
                  'ssdt0003': '',
                  'ssdt0004': '',
                  'ssdt0005': '',
                  'ssdt0006': '',
                  'ssdt0007': '',
                  'ssdt0008': ''
                }
                let hjsmsg = {
                  'ssdt0001': '',
                  'ssdt0002': '',
                  'ssdt0003': '',
                  'ssdt0004': '',
                  'ssdt0005': '',
                  'ssdt0006': '',
                  'ssdt0007': '',
                  'ssdt0008': '',
                  'ssdt0009': '',
                  'ssdt0010': '',
                  'ssdt0011': '',
                  'ssdt0012': '',
                  'ssdt0013': '',
                  'ssdt0014': '',
                  'ssdt0015': ''
                }
                if (res.data.data.data.zt !== '' && res.data.data.data.zt !== undefined) {
                  hjsmsg = res.data.data.data
                } else {
                  hjsmsg['zt'] = '-1'
                }
                if (ret.data.data.data.DISABLED_LEVEL !== undefined && ret.data.data.data.DISABLED_LEVEL !== '') {
                  dismsg = ret.data.data.data
                }
                this.hjobj = {
                  code: '1',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': hjsmsg.zt || '',
                    'ssdt0004': hjsmsg.hh || '',
                    'ssdt0005': hjsmsg.yhzgxdm || '',
                    'ssdt0006': hjsmsg.hkxz || '',
                    'ssdt0007': hjsmsg.hjdz || '',
                    'ssdt0008': hjsmsg.xldm || '',
                    'ssdt0009': hjsmsg.hyzkdm || '',
                    'ssdt0010': hjsmsg.swrq || '',
                    'ssdt0011': hjsmsg.csrq || '',
                    'ssdt0012': hjsmsg.mzdm || '',
                    'ssdt0013': hjsmsg.xbdm || '',
                    'ssdt0014': hjsmsg.csd_gjhdqdm || '',
                    'ssdt0015': hjsmsg.csd_ssxqdm || ''
                  }
                }
                this.hyobj = {
                  code: '',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': '',
                    'ssdt0004': '',
                    'ssdt0005': ''
                  }
                }
                var code = ''
                var detailcode = ''
                console.log(ret.data.data.data.DISABLED_LEVEL, '返回残疾信息')
                if (ret.data.data.data.DISABLED_LEVEL === undefined || ret.data.data.data.DISABLED_LEVEL === '') { // 残联接口查询返回非残疾人
                  if (this.paramData.azcp0009 !== '60' && this.paramData.azcp0504 === undefined && this.paramData.azcp0505 === undefined) { // 填写的是非残疾人
                    code = '2'
                    dismsg.DISABLED_LEVEL = ''
                    dismsg.DISABLED_TYPE_NAME = ''
                    dismsg.STATE = ''
                    dismsg.STIME = ''
                    dismsg.ETIME = ''
                    dismsg.DISABLED_NUMBER = ''
                  } else {
                    code = '3'
                    detailcode = '10'
                    dismsg.DISABLED_LEVEL = ''
                    dismsg.DISABLED_TYPE_NAME = ''
                    dismsg.STATE = ''
                    dismsg.STIME = ''
                    dismsg.ETIME = ''
                    dismsg.DISABLED_NUMBER = ''
                  }
                  console.log('不是残疾人')
                } else if (disLevel === dismsg.DISABLED_LEVEL && disType === dismsg.DISABLED_TYPE_NAME) { // 填写的残疾等级和残疾类别与对接的返回一致
                  code = '2'
                  console.log('是残疾人2')
                } else if (disLevel === dismsg.DISABLED_LEVEL && disType !== dismsg.DISABLED_TYPE_NAME) {
                  code = '3'
                  detailcode = '11'
                  console.log('是残疾人3+11')
                } else if (disLevel !== dismsg.DISABLED_LEVEL && disType === dismsg.DISABLED_TYPE_NAME) {
                  code = '3'
                  detailcode = '12'
                  console.log('是残疾人3+12')
                } else if ((dismsg.DISABLED_LEVEL !== undefined && disLevel !== dismsg.DISABLED_LEVEL) && (dismsg.DISABLED_TYPE_NAME !== undefined && disType !== dismsg.DISABLED_TYPE_NAME)) {
                  code = '3'
                  detailcode = '13'
                  console.log('是残疾人3+13')
                } else if (dismsg.DISABLED_LEVEL === undefined && dismsg.DISABLED_TYPE_NAME === undefined) { // 非残疾人
                  code = '3'
                  detailcode = '10'
                  dismsg.DISABLED_LEVEL = ''
                  dismsg.DISABLED_TYPE_NAME = ''
                  dismsg.STATE = ''
                  dismsg.STIME = ''
                  dismsg.ETIME = ''
                  dismsg.DISABLED_NUMBER = ''
                  console.log('非残疾人')
                }
                this.cjobj = {
                  code: code,
                  detailcode: detailcode,
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': dismsg.STATE,
                    'ssdt0004': dismsg.DISABLED_TYPE_NAME,
                    'ssdt0005': dismsg.DISABLED_LEVEL,
                    'ssdt0006': dismsg.STIME.substr(0, 10),
                    'ssdt0007': dismsg.ETIME.substr(0, 10),
                    'ssdt0008': dismsg.DISABLED_NUMBER
                  }
                }
                console.log(this.cjobj, '残疾人信息')
                personData['ssck0001'] = this.hjobj
                personData['ssck0002'] = this.hyobj
                personData['ssck0003'] = this.cjobj
                this.personList[this.id] = personData
                this.submitFlag = true
              } else {
                this.submitFlag = false
                this.$Modal.error({
                  title: this.errorTitle,
                  content: '错误'
                })
                this.hjobj = {
                  code: '0',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': ''
                  }
                }
                this.hyobj = {
                  code: '',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': '',
                    'ssdt0004': '',
                    'ssdt0005': ''
                  }
                }
                this.cjobj = {
                  code: '0',
                  detailcode: '',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': '',
                    'ssdt0004': '',
                    'ssdt0005': '',
                    'ssdt0006': '',
                    'ssdt0007': '',
                    'ssdt0008': ''
                  }
                }
                personData['ssck0001'] = this.hjobj
                personData['ssck0002'] = this.hyobj
                personData['ssck0003'] = this.cjobj
                this.personList[this.id] = personData
              }
            })
          } else {
            this.submitFlag = false
            this.$Modal.error({
              title: this.errorTitle,
              content: '错误'
            })
            this.hjobj = {
              code: '0',
              data: {
                'ssdt0001': '1',
                'ssdt0002': this.currentDate,
                'ssdt0003': ''
              }
            }
            this.hyobj = {
              code: '',
              data: {
                'ssdt0001': '1',
                'ssdt0002': this.currentDate,
                'ssdt0003': '',
                'ssdt0004': '',
                'ssdt0005': ''
              }
            }
            this.cjobj = {
              code: '0',
              detailcode: '',
              data: {
                'ssdt0001': '1',
                'ssdt0002': this.currentDate,
                'ssdt0003': '',
                'ssdt0004': '',
                'ssdt0005': '',
                'ssdt0006': '',
                'ssdt0007': '',
                'ssdt0008': ''
              }
            }
            personData['ssck0001'] = this.hjobj
            personData['ssck0002'] = this.hyobj
            personData['ssck0003'] = this.cjobj
            this.personList[this.id] = personData
          }
        })
        for (var i = 0; i < this.personList.length; i++) {
          if (this.personList[i].type === 'guarantee') {
            this.form_params.ss11002Data.push(this.personList[i])
          }
        }
        this.submitParam = {
          item_id: this.$route.params.itemid,
          cardno: this.$route.params.cardno,
          form_params: this.form_params,
          code: this.$route.params.code
        }
        // console.log(param, '入参')
      } else { // 新添加
        var personData1 = this.paramData
        // this.personList.push(this.paramData)
        // this.data3 = JSON.parse(JSON.stringify(this.personList))
        var disLevel1 = this.formatDisLevelPerson(personData1.azcp0505)
        var disType1 = this.formatDisTypePerson(personData1.azcp0504)
        createDisabilityApi(HJparam).then(ret => {
          if (ret.data.errcode === 0) {
            createDisabilityApi(CJparam).then(res => {
              if (res.data.errcode === 0) {
                let dismsg = {
                  'DISABLED_LEVEL': '',
                  'DISABLED_TYPE_NAME': '',
                  'STATE': '',
                  'STIME': '',
                  'ETIME': '',
                  'DISABLED_NUMBER': ''
                }
                let hjsmsg = {}
                if (ret.data.data.data) {
                  hjsmsg = ret.data.data.data
                }
                if (res.data.data.data.DISABLED_LEVEL !== undefined && res.data.data.data.DISABLED_LEVEL !== '') {
                  dismsg = res.data.data.data
                }
                this.hjobj = {
                  code: '1',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': hjsmsg.result
                  }
                }
                this.hyobj = {
                  code: '',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': '',
                    'ssdt0004': '',
                    'ssdt0005': ''
                  }
                }
                var code = ''
                var detailcode = ''
                if (res.data.data.data.DISABLED_LEVEL === undefined || res.data.data.data.DISABLED_LEVEL === '') {
                  code = '3'
                  detailcode = '10'
                  dismsg.DISABLED_LEVEL = ''
                  dismsg.DISABLED_TYPE_NAME = ''
                  dismsg.STATE = ''
                  dismsg.STIME = ''
                  dismsg.ETIME = ''
                  dismsg.DISABLED_NUMBER = ''
                } else if (this.paramData.azcp0009 !== '60' && dismsg.DISABLED_LEVEL === undefined && dismsg.DISABLED_TYPE_NAME === undefined) {
                  code = '2'
                  dismsg.DISABLED_LEVEL = ''
                  dismsg.DISABLED_TYPE_NAME = ''
                  dismsg.STATE = ''
                  dismsg.STIME = ''
                  dismsg.ETIME = ''
                  dismsg.DISABLED_NUMBER = ''
                } else if (disLevel1 === dismsg.DISABLED_LEVEL && disType1 === dismsg.DISABLED_TYPE_NAME) { // 填写的残疾等级和残疾类别与对接的返回一致
                  code = '2'
                } else if (disLevel1 === dismsg.DISABLED_LEVEL && disType1 !== dismsg.DISABLED_TYPE_NAME) {
                  code = '3'
                  detailcode = '11'
                } else if (disLevel1 !== dismsg.DISABLED_LEVEL && disType1 === dismsg.DISABLED_TYPE_NAME) {
                  code = '3'
                  detailcode = '12'
                } else if ((dismsg.DISABLED_LEVEL !== undefined && disLevel1 !== dismsg.DISABLED_LEVEL) && (dismsg.DISABLED_TYPE_NAME !== undefined && disType1 !== dismsg.DISABLED_TYPE_NAME)) {
                  code = '3'
                  detailcode = '13'
                } else if (dismsg.DISABLED_LEVEL === undefined && dismsg.DISABLED_TYPE_NAME === undefined) { // 非残疾人
                  code = '3'
                  detailcode = '10'
                  dismsg.DISABLED_LEVEL = ''
                  dismsg.DISABLED_TYPE_NAME = ''
                  dismsg.STATE = ''
                  dismsg.STIME = ''
                  dismsg.ETIME = ''
                  dismsg.DISABLED_NUMBER = ''
                }
                this.cjobj = {
                  code: code,
                  detailcode: detailcode,
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': dismsg.STATE,
                    'ssdt0004': dismsg.DISABLED_TYPE_NAME,
                    'ssdt0005': dismsg.DISABLED_LEVEL,
                    'ssdt0006': dismsg.STIME.substr(0, 10),
                    'ssdt0007': dismsg.ETIME.substr(0, 10),
                    'ssdt0008': dismsg.DISABLED_NUMBER
                  }
                }
                personData1['ssck0001'] = this.hjobj
                personData1['ssck0002'] = this.hyobj
                personData1['ssck0003'] = this.cjobj
                this.personList.push(personData1)
                console.log(this.personList, '人员列表')
                this.data3 = JSON.parse(JSON.stringify(this.personList))
                // this.personList[this.id] = personData1
                this.submitFlag = true
                for (var j = 0; j < this.personList.length; j++) {
                  if (this.personList[j].type === 'guarantee') {
                    this.form_params.ss11002Data.push(this.personList[j])
                  }
                }
                this.submitParam = {
                  item_id: this.$route.params.itemid,
                  cardno: this.$route.params.cardno,
                  form_params: this.form_params,
                  code: this.$route.params.code
                }
              } else {
                this.submitFlag = false
                this.$Modal.error({
                  title: this.errorTitle,
                  content: '错误'
                })
                this.hjobj = {
                  code: '0',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': ''
                  }
                }
                this.hyobj = {
                  code: '',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': '',
                    'ssdt0004': '',
                    'ssdt0005': ''
                  }
                }
                this.cjobj = {
                  code: '0',
                  detailcode: '',
                  data: {
                    'ssdt0001': '1',
                    'ssdt0002': this.currentDate,
                    'ssdt0003': '',
                    'ssdt0004': '',
                    'ssdt0005': '',
                    'ssdt0006': '',
                    'ssdt0007': '',
                    'ssdt0008': ''
                  }
                }
                personData1['ssck0001'] = this.hjobj
                personData1['ssck0002'] = this.hyobj
                personData1['ssck0003'] = this.cjobj
                this.personList.push(personData1)
                this.data3 = JSON.parse(JSON.stringify(this.personList))
                for (let j = 0; j < this.personList.length; j++) {
                  if (this.personList[j].type === 'guarantee') {
                    this.form_params.ss11002Data.push(this.personList[j])
                  }
                }
                this.submitParam = {
                  item_id: this.$route.params.itemid,
                  cardno: this.$route.params.cardno,
                  form_params: this.form_params,
                  code: this.$route.params.code
                }
              }
            })
          }
        })
        console.log(this.personList, '最终人员列表')
      }
      console.log(this.submitParam, '入参')
    },
    submit () { // 调用更新订单接口
      console.log(this.submitParam, '入参')
      // console.log(JSON.toString(this.submitParam), '字符串参数')
      // console.log(JSON.stringify(this.submitParam), '字符串参数1')
      console.log(this.personList, '人员列表')
      updateOrder(this.submitParam).then(res => {
        console.log(res, '蔡成功')
        if (res.data.errcode === 0) {
          this.$Message.success('操作成功')
          for (var i = 0; i < this.personList.length; i++) {
            this.data3[i].azcp0004 = this.getGender(this.data3[i].azcp0001)
            this.getInfo(this.personList[i].azcp0517, this.personList[i].azcp0002, this.personList[i].azcp0013, this.personList[i].azcp0007, this.personList[i].azcp0009, this.personList[i].azcp0502, i)
          }
          this.modal = false
          this.id = ''
        } else {
          const content = '<p>' + '操作失败' + '</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
        }
      })
    },
    okupdateOrder (param) {
      updateOrder(param).then(res => {
        if (res.data.errcode === 0) {
          this.$Message.success('操作成功')
          for (var i = 0; i < this.personList.length; i++) {
            this.data3[i].azcp0004 = this.getGender(this.data3[i].azcp0001)
            this.getInfo(this.personList[i].azcp0517, this.personList[i].azcp0002, this.personList[i].azcp0013, this.personList[i].azcp0007, this.personList[i].azcp0009, this.personList[i].azcp0502, i)
          }
          this.modal = false
          this.id = ''
        } else {
          const content = '<p>' + '操作失败' + '</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
        }
      })
    },
    okNot () { // 录入非保障人员保存
      this.form_params.ss11012Data = []
      delete this.paramData1.azcp0519
      // this.paramData1.ss11012Id = this.$route.params.uuid
      let param = {}
      if (this.paramData1.azcp0003 === '' || this.paramData1.azcp0003 === undefined) {
        const content = '<p>请输入姓名</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0517 === '' || this.paramData1.azcp0517 === undefined) {
        const content = '<p>请选择与申请人关系</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0002 === '' || this.paramData1.azcp0002 === undefined) {
        const content = '<p>请选择证件类型</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0001 === '' || this.paramData1.azcp0001 === undefined) {
        const content = '<p>请填写证件号码</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0013 === '' || this.paramData1.azcp0013 === undefined) {
        const content = '<p>请选择户籍类别</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0010 === '' || this.paramData1.azcp0010 === undefined) {
        const content = '<p>请选择婚姻状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0009 === '' || this.paramData1.azcp0009 === undefined) {
        const content = '<p>请选择健康状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0502 === '' || this.paramData1.azcp0502 === undefined) {
        const content = '<p>请选择劳动能力丧失状况</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0551url === '' || this.paramData1.azcp0551url === undefined) {
        const content = '<p>请上传身份证正面照片</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.paramData1.azcp0552url === '' || this.paramData1.azcp0552url === undefined) {
        const content = '<p>请上传身份证反面照片</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
        return
      }
      if (this.id !== '') { // 编辑
        this.personList[this.id] = this.paramData1
        // this.personList[this.id].ss11012Id = this.$route.params.uuid
        this.data3 = JSON.parse(JSON.stringify(this.personList))
        for (var i = 0; i < this.personList.length; i++) {
          if (this.personList[i].type === 'nonSecurity') {
            this.form_params.ss11012Data.push(this.personList[i])
          }
        }
        // this.form_params.ss11002Data = this.personList
        param = {
          item_id: this.$route.params.itemid,
          cardno: this.$route.params.cardno,
          form_params: this.form_params,
          code: this.$route.params.code
        }
      } else {
        this.personList.push(this.paramData1)
        this.data3 = JSON.parse(JSON.stringify(this.personList))
        for (var j = 0; j < this.personList.length; j++) {
          if (this.personList[j].type === 'nonSecurity') {
            this.form_params.ss11012Data.push(this.personList[j])
          }
        }
        // this.form_params.ss11002Data = this.personList
        param = {
          item_id: this.$route.params.itemid,
          cardno: this.$route.params.cardno,
          form_params: this.form_params,
          code: this.$route.params.code
        }
      }
      updateOrder(param).then(res => {
        if (res.data.errcode === 0) {
          this.$Message.success('操作成功')
          for (var i = 0; i < this.personList.length; i++) {
            this.data3[i].azcp0004 = this.getGender(this.data3[i].azcp0001)
            this.getInfo(this.personList[i].azcp0517, this.personList[i].azcp0002, this.personList[i].azcp0013, this.personList[i].azcp0007, this.personList[i].azcp0009, this.personList[i].azcp0502, i)
          }
          this.modalNot = false
          this.id = ''
        } else {
          const content = '<p>' + '操作失败' + '</p>'
          this.$Modal.error({
            title: this.errorTitle,
            content: content
          })
        }
      })
    },
    edit (index) {
      console.log(index, '下标')
      this.submitFlag = false
      this.id = index
      if (this.personList[index].ss11012Id === undefined) { // 保障人员
        this.personType = 'guarantee'
        if (index === 0) {
          this.paramData.azcp0517 = '01'
          this.paramData = this.personList[index]
          this.paramData.ss11002Id = this.$route.params.uuid
          this.nophoto2 = this.personList[index].azcp0519url
        } else {
          // this.paramData.azcp0517 = ''
          this.paramData = this.personList[index]
          this.nophoto2 = ''
        }
        this.modal = true
        this.paramData.type = 'guarantee'
        this.nophoto = this.paramData.azcp0551url
        this.nophoto1 = this.paramData.azcp0552url
      } else { // 非保障人员
        this.personType = 'nonSecurity'
        this.modalNot = true
        this.paramData1 = this.personList[index]
        this.paramData1.type = 'nonSecurity'
        this.nophoto = this.paramData1.azcp0551url
        this.nophoto1 = this.paramData1.azcp0552url
      }
    },
    deletePeople (index) {
      if (confirm('确定删除吗')) {
        this.data3.splice(index, 1)
        this.personList.splice(index, 1)
        var tempArr = []
        var tempArr1 = []
        for (var i = 0; i < this.personList.length; i++) {
          if (this.personList[i].type === 'nonSecurity') {
            tempArr.push(this.personList[i])
          } else if (this.personList[i].type === 'guarantee') {
            tempArr1.push(this.personList[i])
          }
        }
        this.form_params.ss11012Data = JSON.parse(JSON.stringify(tempArr))
        this.form_params.ss11002Data = JSON.parse(JSON.stringify(tempArr1))
        var param = {
          item_id: this.$route.params.itemid,
          cardno: this.$route.params.cardno,
          form_params: this.form_params,
          code: this.$route.params.code
        }
        updateOrder(param).then(res => {
          if (res.data.errcode === 0) {
            this.$Message.success('操作成功')
            for (var i = 0; i < this.personList.length; i++) {
              this.data3[i].azcp0004 = this.getGender(this.data3[i].azcp0001)
              this.getInfo(this.personList[i].azcp0517, this.personList[i].azcp0002, this.personList[i].azcp0013, this.personList[i].azcp0007, this.personList[i].azcp0009, this.personList[i].azcp0502, i)
            }
            this.id = ''
          } else {
            const content = '<p>' + '操作失败' + '</p>'
            this.$Modal.error({
              title: this.errorTitle,
              content: content
            })
          }
        })
      }
    },
    next () {
      console.log(this.form_params)
      if (this.form_params.ss11002Data.length === 0) {
        console.log('334')
        const content = '<p>' + '清先完善申请人本人信息' + '</p>'
        this.$Modal.error({
          title: this.errorTitle,
          content: content
        })
      } else {
        this.$router.push({
          name: 'db_subsistenceapplication2',
          params: this.next_params
        })
      }
    },
    changePage () {
      // The simulated data is changed directly here, and the actual usage scenario should fetch the data from the server
      this.data3 = this.getFamilyList()
    },
    entry () { // 录入保障人员
      this.id = ''
      this.submitFlag = false
      this.personType = 'guarantee'
      this.modal = true
      this.getInfo()
      this.nophoto = ''
      this.nophoto1 = ''
      this.paramData = {}
      this.paramData.ss11002Id = getUuid()
      this.paramData.type = 'guarantee'
      // if (this.itemid === '11210101000000MZJD5212000330000') {
      //   this.url = 'dbsq/addPersonInfo'
      // } else if (this.itemid === '11210101000000MZJD5212000351000') {
      //   this.url = 'dbbg/addPersonInfo'
      // }
    },
    entryNot () { // 录入非保障
      this.id = ''
      this.personType = 'nonSecurity'
      this.modalNot = true
      this.getInfo()
      this.nophoto = ''
      this.nophoto1 = ''
      this.paramData1 = {}
      this.paramData1.ss11012Id = getUuid()
      this.paramData1.type = 'nonSecurity'
    },
    getGender (IDCard) {
      if (parseInt(IDCard.substr(16, 1)) % 2 === 1) {
        return '男'
      } else {
        return '女'
      }
    },
    // 时间转字符串 年月日时分秒
    datetime2str (date) {
      let time1 = date.getFullYear() + ''
      let month = date.getMonth() + 1
      let day = date.getDate()
      let hh = date.getHours()
      let mm = date.getMinutes()
      let ss = date.getSeconds()
      time1 += month < 10 ? '0' + month : month
      time1 += day < 10 ? '0' + day : day
      time1 += hh < 10 ? '0' + hh : hh
      time1 += mm < 10 ? '0' + mm : mm
      time1 += ss < 10 ? '0' + ss : ss
      return time1
    }
  },
  mounted () {
    var myDate = new Date()
    this.currentDate = date2str(myDate)
    let param2 = {
      'cardno': this.idcardNumber,
      'id': this.itemid,
      'code': this.$route.params.code,
      'params': '1'
    }
    iteminf(param2).then(res => {
      this.data3 = []
      this.personList = []
      this.personList1 = []
      if (res.data.data) {
        if (JSON.parse(res.data.data.form_params).ss11001Data) {
          this.form_params.ss11001Data = JSON.parse(res.data.data.form_params).ss11001Data
        }
        console.log((JSON.parse(res.data.data.form_params)).ss11002Data, '111')
        if ((JSON.parse(res.data.data.form_params)).ss11002Data.length > 0) {
          this.form_params.ss11002Data = JSON.parse(res.data.data.form_params).ss11002Data
          var array = JSON.parse(JSON.stringify(this.form_params.ss11002Data))
          this.data3.push.apply(this.data3, JSON.parse(JSON.stringify(array)))
          this.personList.push.apply(this.personList, JSON.parse(JSON.stringify(array)))
          for (var i = 0; i < array.length; i++) {
            this.data3[i].azcp0004 = this.getGender(this.data3[i].azcp0001)
            if (array[i].ss11002Id !== this.$route.params.uuid && array[i].azcp0001 === this.$route.params.cardno) {
              array[i].ss11002Id = this.$route.params.uuid
              this.paramData.ss11002Id = this.$route.params.uuid
              this.paramData.azcp0517 = '01'
            }
            this.getInfo(this.data3[i].azcp0517, this.data3[i].azcp0002, this.data3[i].azcp0013, this.data3[i].azcp0007, this.data3[i].azcp0009, this.data3[i].azcp0502, i)
          }
        } else {
          console.log('first')
          this.data3[0] = (JSON.parse(res.data.data.form_params)).ss11001Data
          this.personList[0] = (JSON.parse(res.data.data.form_params)).ss11001Data
          this.data3[0].azcp0004 = this.getGender(this.$route.params.cardno)
          this.paramData.ss11002Id = this.$route.params.uuid
          this.paramData.azcp0517 = '01'
          this.getInfo('01', this.data3[0].azcp0002, this.data3[0].azcp0013, this.data3[0].azcp0007, this.data3[0].azcp0009, this.data3[0].azcp0502, 0)
        }
        this.paramData.azcp0003 = (JSON.parse(res.data.data.form_params)).ss11001Data.azcp0003
        this.paramData.azcp0001 = (JSON.parse(res.data.data.form_params)).ss11001Data.azcp0001
        if ((JSON.parse(res.data.data.form_params)).ss11012Data.length > 0) { // 有非保障人口
          this.form_params.ss11012Data = JSON.parse(res.data.data.form_params).ss11012Data
          console.log(this.form_params.ss11012Data, '非保障')
          var array1 = JSON.parse(JSON.stringify(this.form_params.ss11012Data))
          for (var l = 0; l < array1.length; l++) {
            if (!array1[l].ss11012Id || array1[l].ss11012Id === undefined) {
              array1[l].ss11012Id = getUuid()
            }
          }
          this.data3.push.apply(this.data3, JSON.parse(JSON.stringify(array1)))
          this.personList.push.apply(this.personList, JSON.parse(JSON.stringify(array1)))
          for (var j = 0; j < this.data3.length; j++) {
            this.data3[j].azcp0004 = this.getGender(this.data3[j].azcp0001)
            this.getInfo(this.data3[j].azcp0517, this.data3[j].azcp0002, this.data3[j].azcp0013, this.data3[j].azcp0007, this.data3[j].azcp0009, this.data3[j].azcp0502, j)
          }
        } else { // 无非保障人口
          console.log('无非保障人口')
        }
        if (JSON.parse(res.data.data.form_params).ss11003Data) {
          this.form_params.ss11003Data = JSON.parse(res.data.data.form_params).ss11003Data
        }
        if (JSON.parse(res.data.data.form_params).ss11004Data) {
          this.form_params.ss11004Data = JSON.parse(res.data.data.form_params).ss11004Data
        }
        if (JSON.parse(res.data.data.form_params).ss11005Data) {
          this.form_params.ss11005Data = JSON.parse(res.data.data.form_params).ss11005Data
        }
        if (JSON.parse(res.data.data.form_params).ss11006Data) {
          this.form_params.ss11006Data = JSON.parse(res.data.data.form_params).ss11006Data
        }
        if (JSON.parse(res.data.data.form_params).ss11007Data) {
          this.form_params.ss11007Data = JSON.parse(res.data.data.form_params).ss11007Data
        }
        if (JSON.parse(res.data.data.form_params).ss11008Data) {
          this.form_params.ss11008Data = JSON.parse(res.data.data.form_params).ss11008Data
        }
        if (JSON.parse(res.data.data.form_params).ss11009Data) {
          this.form_params.ss11009Data = JSON.parse(res.data.data.form_params).ss11009Data
        }
        if (JSON.parse(res.data.data.form_params).ss11010Data) {
          this.form_params.ss11010Data = JSON.parse(res.data.data.form_params).ss11010Data
        }
        if (JSON.parse(res.data.data.form_params).ss12001Data) {
          this.form_params.ss12001Data = JSON.parse(res.data.data.form_params).ss12001Data
        }
      }
    })
    this.next_params = {
      serialNumber: this.$route.params.serialNumber,
      idcardNumber: this.$route.params.idcardNumber,
      cardno: this.$route.params.cardno,
      code: this.$route.params.code,
      see: this.see,
      itemid: this.itemid,
      order_state: this.order_state,
      uuid: this.$route.params.uuid
    }
    this.getInfo()
  }
}
</script>
